/**
 * @title BindCellphoneCommunicater.java
 * @package com.esun.cheetah.biz.personal.bindcellphone
 * @description 
 * @author liugan
 * @date 2012-4-24
 * @copyright 深圳市易讯天空
 */
package com.esun.cheetah.biz.personal.bindcellphone;

import java.util.HashMap;

import org.json.JSONException;

import android.os.Handler;
import android.os.Message;
import com.esun.cheetah.config.BizCode;
import com.esun.cheetah.config.Config;
import com.esun.cheetah.config.Key;
import com.esun.cheetah.network.AbsInferiorityCommunicater;

/**
 * @title BindCellphoneCommunicater
 * @description 绑定手机通信类
 * @author liugan
 */
public class BindCellphoneCommunicater extends AbsInferiorityCommunicater {

	private String mPhoneNumber;
	private String mCode;
	private String mCk;

	/**
	 * @param handler
	 */
	public BindCellphoneCommunicater(Handler handler, String phoneNumber,
			String code, String ck) {
		super(handler);
		this.mPhoneNumber = phoneNumber;
		this.mCode = code;
		this.mCk = ck;

	}

	@Override
	public HashMap<String, String> comHashMap() {
		HashMap<String, String> hmJson = new HashMap<String, String>();
		hmJson.put(Key.KEY_ID, BizCode.BIND_MOBILE);
		hmJson.put(Key.KEY_PHONE_NUMBER, this.mPhoneNumber);
		hmJson.put(Key.KEY_CK, this.mCk);
		hmJson.put(Key.CODE, this.mCode);
		hmJson.put(Key.KEY_FLAG, Config.NUM0);
		return hmJson;
	}

	@Override
	public void getJsonContent(String serverRes) throws JSONException {

	}

	@Override
	public void getServerResponseFail(String serverRes) {
		Message msg = handlerFromAct.obtainMessage(Config.COMMUNICATER_FAIL);
		msg.obj = this.getServerMsg();
		handlerFromAct.sendMessage(msg);
	}

}
